{% extends "base.html" %}

{% block title %}
    部门管理
{% endblock %}
{% block content %}
    <!-- Page Content -->
    <div id="page-wrapper">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">
                        部门管理
                        <a class="btn btn-default pull-right" href="/add_department">添加</a>
                    </h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="row">
                        <table class="table">
                            <thead>
                            <tr>
                                <th>部门名称</th>
                                <th>部门描述</th>
                                <th>部门操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {% for department in department_list %}
                            <tr>
                                <td class="col-lg-4">{{ department.d_name }}</td>
                                <td class="col-lg-4">{{ department.d_description }}</td>
                                <td class="col-lg-4">
                                    <a class="btn btn-default" href="/edit_department?id={{ department.id }}">编辑</a>
                                    <a class="btn btn-default" href="/department?id={{ department.id }}">删除</a>
                                    <a class="btn btn-default" href="/position?id={{ department.id }}">查看职位</a>
                                </td>
                            </tr>
                            {% endfor %}

                            </tbody>
                        </table>
                    </div>
                </div>
                <!-- /.col-lg-12 -->
            </div>
        </div>
        <!-- /.container-fluid -->
    </div>
    <!-- /#page-wrapper -->
{% endblock %}